{template 'common/header'}

<div class="panel panel-default">
    <div class="panel-heading">编辑广告</div>
    <div class="panel-body">
        <form class="form-horizontal" role="form" action="" method="POST">

            <!--表单开始-->
            <div class="form-group">
                <label class="col-sm-2 control-label">广告名称</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="ads_title" value="{$ads['ads_title']}" placeholder="请输入广告名称">
                    <span class="help-block">广告名称</span>
                </div>
            </div>
            <!--表单结束-->

            <!--表单开始-->
            <div class="form-group">
                <label class="col-sm-2 control-label">广告状态</label>
                <div class="col-sm-8">

                    <label class="radio-inline">
                        <input type="radio" name="ads_pid" value="1" {if $ads['ads_pid']=='1'}checked="checked"{else}{/if}>显示
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="ads_pid" value="2" {if $ads['ads_pid']=='2'}checked="checked"{else}{/if}>隐藏
                    </label>
                    <span class="help-block">广告状态</span>
                </div>
            </div>
            <!--表单结束-->

            <!--表单开始-->
            <div class="form-group">
                <label class="col-sm-2 control-label">广告位置</label>
                <div class="col-sm-8">

                    <label class="radio-inline">
                        <input type="radio" name="ads_type" value="1" {if $ads['ads_type']=='1'}checked="checked"{else}{/if}>首页
                    </label>

                    <label class="radio-inline">
                        <input type="radio" name="ads_type" value="2" {if $ads['ads_type']=='2'}checked="checked"{else}{/if}>社区
                    </label>

                    <label class="radio-inline">
                        <input type="radio" name="ads_type" value="3" {if $ads['ads_type']=='3'}checked="checked"{else}{/if}>老师
                    </label>
                </div>
            </div>
            <!--表单结束-->

            <!--表单开始-->
            <div class="form-group">
                <label class="col-sm-2 control-label">广告排序</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <div class="input-group-addon">第</div>
                        <input type="number" class="form-control" id="" name="ads_did" value="{$ads['ads_did']}" placeholder="请输入广告排序">
                        <div class="input-group-addon">位</div>
                    </div>
                    <span class="help-block">广告排序，数字越小越靠前</span>
                </div>
            </div>
            <!--表单结束-->

            <!--表单开始-->
            <!--<div class="form-group">
                <label class="col-sm-2 control-label">广告链接</label>
                <div class="col-sm-8">
                    {php echo tpl_form_field_link('ads_link',$ads['ads_link']);}
                    <span class="help-block">广告链接</span>
                </div>
            </div>-->
            <!--表单结束-->

            <!--表单开始-->
            <div class="form-group">
                <label class="col-sm-2 control-label">广告图标</label>
                <div class="col-sm-8">
                    {php echo tpl_form_field_image('ads_pic',$ads['ads_pic']);}
                    <span class="help-block">广告图标比例 412:140</span>
                </div>
            </div>
            <!--表单结束-->


            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input class="btn btn-default" type="submit" name="submit" value="提 交">

                </div>
            </div>
            <input type="hidden" name="token" value="{$_W['token']}"/>

        </form>
    </div>
</div>

{template 'common/footer'}